#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
#define my_offsetof(type,mem) (size_t)&(((type*)0)->mem)
struct S
{
	int a;
	int b;
	char c;
};
int main()
{
	struct S s;
	printf("%d",my_offsetof(struct S, c));
	return 0;
}